Skip to content

[Release] Increase version to 1.1.5 (and #47) - #48

Merged
Nev (MSNev) merged 1 commit into
masterfrom
MSNev/DynamicProto
Apr 28, 2022
Merged

Nev (MSNev) merged 1 commit into
masterfrom
MSNev/DynamicProto

Conversation

@MSNev

@MSNev Nev (MSNev) commented Apr 28, 2022 •

Copy link
Copy Markdown
Contributor

[IE8] The _checkPrototype always fails on IE in IE8 mode #47

Comment thread lib/docs/index.html Outdated
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/microsoft/DynamicProto-JS/blob/ac722ee/lib/src/DynamicProto.ts#L481">DynamicProto.ts:481</a></li>
<li>Defined in <a href="https://github.com/microsoft/DynamicProto-JS/blob/731b396/lib/src/DynamicProto.ts#L484">DynamicProto.ts:484</a></li>

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Auto generated

var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
var desc = Object.getOwnPropertyDescriptor(m, k);

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Auto updated as part of increasing the version of rush being used

Comment thread lib/src/DynamicProto.ts
}

return false;
// If objGetPrototypeOf doesn't exist then just assume everything is ok.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This only affects "Old" runtimes IE8 and eariler.
So the side affect of this is that anyone using this will fail to start because the _checkPrototype always fails and throws.

Comment thread package.json
"eslint-plugin-security": "^1.4.0",
"grunt": "^1.4.1",
"grunt-cli": "^1.3.2",
"grunt": "^1.5.2",

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Component Governance fixes

@MSNev
Nev (MSNev) force-pushed the MSNev/DynamicProto branch 2 times, most recently from f424da6 to acd4433 Compare April 28, 2022 18:20
Comment thread lib/src/DynamicProto.ts
let newProto = target[DynProtoPolyProto] || target[str__Proto] || target[Prototype] || (target[Constructor] ? target[Constructor][Prototype] : null);
if(newProto) {
// Set the _dynProto so the hierarchy can lookup base classes correctly on IE8
if (!target[DynProtoPolyProto]) {

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because IE8 doesn't support looking up the prototype of a prototype, we need to provide hints to allow base classes that are also defined using dynamicProto() to be looked up.

This issue only exists for nested classes of 2 or more. And this part of the code only runs on older browsers

@MSNev
Nev (MSNev) merged commit 98e5db7 into master Apr 28, 2022
@MSNev Nev (MSNev) added this to the 1.1.5 milestone Apr 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants